package net.poddubnyak.friendlist.dao;

import java.util.List;

import net.poddubnyak.friendlist.domain.User;

/**
 * UserDAO interface represents DAO interface for User class.
 * 
 * @author Poddubnjak Petr
 */
public interface UserDAO {

	/**
	 * Add User to Database
	 * 
	 * @param user
	 */
	public void addUser(User user);

	/**
	 * Delete User from database
	 * 
	 * @param id
	 *            - id of user
	 */
	public void removeUser(Integer id);

	/**
	 * Update record in database
	 * 
	 * @param user
	 *            - wich need to update
	 */
	public void updateUser(User user);

	/**
	 * Get list of all Users from database
	 * 
	 * @return - list of all users
	 */
	public List<User> listUser();

	/**
	 * Get list of 5 toprated Users from database
	 * 
	 * @return - list of 5 toprated users.
	 */
	public List<User> listTopUsers();

	/**
	 * Get list of classmates Users from database
	 * 
	 * @param groupId
	 *            - id of group
	 * @return - list of classmates users
	 */
	public List<User> listClassmates(String groupId);

	/**
	 * Gets User from database by id
	 * 
	 * @param id
	 *            - id of User
	 * @return - User
	 */
	public User getUserById(Integer id);

	/**
	 * Gets User from database by email
	 * @param email - addres of users email
	 * @return - User
	 */
	public User getUserByEmail(String email);

}
